public class Numbers
{
   /**
      Computes the number of even and odd values in a given array
      @param values an array of integer values
      @return an array of length 2 whose 0 entry contains the count
      of even elements and whose 1 entry contains the count of odd
      values
   */
   public int[] evenOdds(int[] values)
   {
      // your work here
      int array[] = new int[2];
      int length = values.length;
      int i,a = 0,b = 0;
      for(i = 0;i < length;i++)
      {
         if(values[i]%2 == 0)
           a++;
         else
           b++;
      }
      array[0] = a;
      array[1] = b;
      return array;
   }
}